import request from "@/utils/request";
//列表
export function getlist(data) {
  // console.log(params);
  return request({
    url: "/sys/buildings/list",
    method: "post",
    data,
  });
}

//添加or修改
export function saveAndUpdate(data) {
  return request({
    url: "/sys/buildings/saveAndUpdate",
    method: "post",
    data,
  });
}
//删除
export function buildingsDelete(data) {
  return request({
    url: `/sys/buildings/delete`,
    method: "post",
    data,
  });
}

//查询
export function buildings(id) {
  return request({
    url: `/sys/buildings/${id}`,
    method: "get",
  });
}

//猪栏列表
export function getColumnByBuildingsId(id) {
  return request({
    url: `/sys/column/getColumnByBuildingsId?buildingsId=${id}`,
    method: "get",
  });
}

//删除栏数 /sys/column/delete/{id}
export function deleteNumber(data) {
  return request({
    url: `/sys/column/delete`,
    method: "post",
    data,
  });
}

//修改或添加栏数
export function saveAndUpdateNumber(data) {
  return request({
    url: `/sys/column/saveAndUpdate`,
    method: "post",
    data,
  });
}
